﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace seiacpscs_a2.datastructures.hashtable
{
   public class ModuloStrategy : HashTableStrategy{


	public override int hash(int item) {
		 int hashIndex = item % numberOfBuckets;	 
		 return hashIndex;
	}

	
	public override int calculateNumberOfBuckets(int[] items) {
		 int maxSize = items.Length;
		 numberOfBuckets = (maxSize <= 100) ? 10: maxSize / 10 ;
		 return numberOfBuckets; 
		
	}

}

}
